Skip to content

1×1 Check-In Widget#5

Merged
resurrectdev1 merged 13 commits into
resurrectdev1:mainfrom
ADAIBLOG:widget
Jun 21, 2026
Merged

1×1 Check-In Widget#5
resurrectdev1 merged 13 commits into
resurrectdev1:mainfrom
ADAIBLOG:widget

Conversation

@ADAIBLOG

Copy link
Copy Markdown
Contributor

What does this PR do?

Add a 1×1 home screen check-in widget. Users can bind a check-in mode habit to the widget and tap the icon to quickly check in / uncheck today without opening the app.

Also fixes two data-sync gaps between widgets and the app:

  • Widget → App: GroveModel now calls SharedPreferences.reload() and re-reads data when the app resumes, so changes made by the widget are picked up immediately.
  • App → Widget: widget_bridge.dart now always calls updateWidgets, even if rendering a single habit tree fails.

Type of change

  • Bug fix
  • New feature

How has this been tested?

Tested on a real Android device with the following scenarios:

  1. Added a check-in habit → added the widget from launcher → habit picker shows "Check-In Widget" label.
  2. Selected a check-in habit → widget shows habit name, circle icon, and streak count.
  3. Tapped the icon → toggled ✓ (colored) / ○ (grey). Streak count updated correctly.
  4. Opened the app → habit card reflected the changes made from the widget.
  5. Checked in from the app → widget updated after updatePeriodMillis / force refresh.
  6. Tapped widget background (not icon) → no app launch.
  7. Selected an abstain-mode habit → widget showed "—" and was non-interactive.

Checklist

  • Tested on a real Android device
  • CHANGELOG.md updated under [Unreleased]
  • No new dependencies that phone home or collect data
  • Code follows the existing style

@resurrectdev1 resurrectdev1 merged commit f15e804 into resurrectdev1:main Jun 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants